package com.example.botany_api.service;

import com.example.botany_api.bean.Carousel;
import com.example.botany_api.bean.User;
import com.example.botany_api.mapper.SystemMapper;
import com.example.botany_api.mapper.UserMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author 漫画忧作
 * @Date 2022/10/29 23:25
 * @Version 1.0
 */
@Service
public class SystemService {
    @Autowired
    SystemMapper systemMapper;

    //    分页
    public List getCarouselImgList(String time, int current, int size) {
        return systemMapper.getCarouselImgList(time, current, size);
    }

    //    总数
    public int getCarouselImgTotal(String time) {
        return systemMapper.getCarouselImgTotal(time);
    }

    //    添加轮播图
    public int add_CarouselImg(Carousel carousel) {
        return systemMapper.add_CarouselImg(carousel);
    }

    //    删除轮播图
    public int dl_CarouselImg(int id) {
        return systemMapper.dl_CarouselImg(id);
    }

    //    获得网站尾部数据
    public List get_tailData() {
        return systemMapper.get_tailData();
    }

    //    修改尾部数据
    public int up_tailData(String data_one,  String data_two,  String data_three) {
        return systemMapper.up_tailData(data_one,  data_two, data_three);
    }
}
